package com.carleasoft.mps.adu.business.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carleasoft.mps.adu.business.user.bean.entity.AuthorityUserDept;
import com.carleasoft.mps.adu.business.user.bean.entity.AuthorityUserEntity;
import com.carleasoft.mps.adu.business.user.bean.po.AuthorityAdminPo;
import com.carleasoft.mps.adu.business.user.bean.po.AuthorityUserPo;
import com.carleasoft.mps.adu.business.user.bean.po.UserQueryPO;
import com.carleasoft.mps.adu.business.user.bean.vo.AuthorityUserDetailVo;
import com.carleasoft.mps.adu.business.user.bean.vo.DeptUserVo;
import com.carleasoft.mps.core.user.UserDeptVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 部门信息表 Mapper 接口
 * </p>
 *
 * @author ztm
 * @since 2021-09-09
 */
@Repository
@Mapper
public interface AuthorityUserDeptDao extends BaseMapper<AuthorityUserDept> {
    List<UserDeptVo> getDeptByUserCode(@Param("userCode") String userCode);
    List<AuthorityUserEntity> administratorsList(@Param("userCat") Integer userCat,@Param("authorityAdminPo") AuthorityAdminPo authorityAdminPo);
    Page<AuthorityUserDetailVo> getByDept(@Param("page") Page page,@Param("userQueryPO") UserQueryPO userQueryPO,@Param("userCat") Integer userCat);

    List<DeptUserVo> getAllActiveUser();
    List<DeptUserVo> getAllActiveDept();

    Page<AuthorityUserDetailVo>  getBydeptInfo(@Param("page") Page page, @Param("userQueryPO") UserQueryPO userQueryPO, @Param("userCat") Integer superAdmin);
}
